<?php 

/**
 * NOTICE OF LICENSE
 *
 * THIS SOURCE FILE IS PART OF EVEBIT'S PRIVATE PROJECT.
 * 
 * DO NOT USE THIS FILE IN OTHER PLACE.
 * 
 * @category    ChinaWanderer
 * @package     Backend
 * @subpackage  Template
 * @author      Chen Qiao <chen.qiao@evebit.com>
 * @version     $$Id: edit.phtml 313 2011-04-12 06:57:16Z chang.zhenhua $$
 * @copyright   Copyright (c) 2011 Evebit Inc. China (http://www.evebit.com)
 */

$data = $this->event;
$tree=$this->tree;
$acl=$this->acl;
$headtitle="";
if(sizeof($data->getData())==0)
$headtitle=$this->__('Add new Role');
else 
$headtitle=$this->__('Edit Role');
$this->headTitle($headtitle);
$this->module = 'default/';
$inputs	= array();
if($data->getId() > 0){
	$inputs =array('id'=>array('type'=>'hidden'));
}
echo $this->action(
		'render', 'block', 'blocks',
		array(
			'template'=>'form',
			'form'=>'eventEditor',
			'label'=>$headtitle,
			'return_url'=>$this->baseUrl('default/role/index'),
			'post_url'=>$this->baseUrl('default/role/save-edit'),
			'data'=>$data,
		    'acl'=>$acl,
            'inputs'=>$inputs,
			'fieldsets'=>array(
				array(
					'label'=>$this->__('General Information'),
					'inputs'=>array(
						'role_name'=>array(
							'label'=>$this->__('Name'),
							'type'=>'input',
							'class'=>'required'
						),
						
					),
				),
			)
			
		));
		?>

<script type="text/javascript">
<!--
$().ready(function() {
	$("#eventEditor").validate();
	$("#role-tree-ul").treeview({
		animated: "fast",
		collapsed: false,
		unique: false
	});
	$("#role-tree").css("display","block");
});


//-->
</script>
<script type="text/javascript" src="<?php echo $this->baseUrl('media/js/ckeditor/ckeditor.js')?>"></script> 
